package com.jijidom.product.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.jijidom.product.dataobject.ProductCategory;

import java.util.List;

/**
 * @ClassName ProductInfoRepository
 * @Description TODO
 * @Author JinTao
 * @Date 2018/8/30 17:55
 * @Version 1.0
 **/
public interface ProductCategoryRepository extends JpaRepository<ProductCategory,Integer> {

    @Query(value = "select * from product_category where category_type IN (:categoryTypeList)",nativeQuery = true)
    List<ProductCategory> findByCategoryType(@Param("categoryTypeList")List<Integer> categoryTypeList);
}
